package com.yummy.mapper;

import com.yummy.entity.ShoppingCart;
import com.yummy.common.CommonMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author yinbo
* @description 针对表【shopping_cart(购物车)】的数据库操作Mapper
* @createDate 2022-08-29 23:07:35
* @Entity com.yummy.entity.ShoppingCart
*/
public interface ShoppingCartMapper extends CommonMapper<ShoppingCart> {


	ShoppingCart selectByUserAndDish(@Param("userId") Integer userId, @Param("dishId") Long dishId);

	int insertCart(ShoppingCart shoppingCart);

	int updateNumberById(ShoppingCart cart);

	List<ShoppingCart> selectAllByUserAndStore(@Param("userId") Integer userId, @Param("storeId") int storeId);

	int removeCart(ShoppingCart cart);

	int removeCartsBatch(List<ShoppingCart> cartList);
}
